package util;

import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;

public class TimeUtil {
    private static TimeUtil timeUtil = new TimeUtil();

    private TimeUtil() {
    }

    public static TimeUtil getInstance() {
        return timeUtil;
    }

    private final String defaultTimePatten = "yyyy-MM-dd HH:mm:ss";

    DateTimeFormatter formatter = DateTimeFormatter.ofPattern(defaultTimePatten);

    public String getNowDefaultPattenTime(){
        return formatter.format(LocalDateTime.ofInstant(Instant.now(), ZoneId.systemDefault()));
    }

}
